﻿using Client.Framework;
using Common.Helpers;
using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Text;

namespace Client.ViewModel
{
    public class HomeViewModel : ViewModelBase, IPageViewModel
    {
        public string Name
        {
            get
            {
                return "Početna strana";
            }
        }

        public string Icon
        {
            get
            {
                return "Images/home.png";
            }
        }

        public byte[] Implementation
        {
            get
            {
                string path = string.Empty;
                if (GlobalVariables.Instance.dbConnection == Common.Helpers.Enums.DatabaseConnection.MasterApp1)
                    path = "i1";
                else if (GlobalVariables.Instance.dbConnection == Common.Helpers.Enums.DatabaseConnection.MasterApp2)
                    path = "i2";
                else if (GlobalVariables.Instance.dbConnection == Common.Helpers.Enums.DatabaseConnection.MasterApp3)
                    path = "i3";
                string fullPath = string.Format("../../Resources/Images/{0}.png", path);
                return File.ReadAllBytes(@fullPath);
            }
        }
    }
}
